package com.qst.crop.service;

import com.qst.crop.entity.Order;
import com.github.pagehelper.PageInfo;

import java.util.List;
//封装订单模块的核心业务逻辑

public interface OrderService {
    //查询所有订单
    PageInfo<Order> selectAll(Integer pageNum);
    //查询类型为货源的订单
    PageInfo<Order> selectAllGoods(Integer pageNum);
    //需求的订单
    PageInfo<Order> selectAllNeeds(Integer pageNum);
    //添加订单
    void add(Order order);
    //更新订单
    void update(Order order);
    //删除订单
    void delete(Integer id);
    //按类型和分页查询
    PageInfo<Order> selectByType(String type, Integer pageNum);
    //通过id查询订单
    Order selectById(Integer id);
    //条件搜索订单
    //货源
    PageInfo<Order> selectGoodsByKeys(String keys,Integer pageNum,String name);
    //需求
    PageInfo<Order> selectNeedsByKeys(String keys,Integer pageNum,String name);
    //全部类型
    PageInfo<Order> selectAllByKeys(String keys,Integer pageNum);
    //下架订单
    void takeDown(String orderId);
    //上架订单
    void takeUp(String orderId);
}
